package com.hc.bean;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import java.util.Objects;

public class SysRoleBean {
   private Integer role_id;//	bigint
    private String  role_name;//	varchar(100)
    private String  remark;//	varchar(100)
    private Integer   create_user_id;//	bigint

    private List<Integer> menuIdList;//用于接收前端在增加或修改角色时选中的menudId列表(树节点)

    public List<Integer> getMenuIdList() {
        return menuIdList;
    }

    public void setMenuIdList(List<Integer> menuIdList) {
        this.menuIdList = menuIdList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SysRoleBean that)) return false;
        return Objects.equals(role_id, that.role_id) && Objects.equals(role_name, that.role_name) && Objects.equals(remark, that.remark) && Objects.equals(create_user_id, that.create_user_id) && Objects.equals(create_time, that.create_time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(role_id, role_name, remark, create_user_id, create_time);
    }

    @Override
    public String toString() {
        return "SysRoleBean{" +
                "role_id=" + role_id +
                ", role_name='" + role_name + '\'' +
                ", remark='" + remark + '\'' +
                ", create_user_id=" + create_user_id +
                ", create_time=" + create_time +
                '}';
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;//	datetime

    public Integer getRole_id() {
        return role_id;
    }

    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getCreate_user_id() {
        return create_user_id;
    }

    public void setCreate_user_id(Integer create_user_id) {
        this.create_user_id = create_user_id;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
}
